Optimal. Leaf size=74 \[ \frac {3 b \tanh ^{-1}(\sin (c+d x))}{8 d}-\frac {3 b \sec (c+d x) \tan (c+d x)}{8 d}+\frac {b \sec (c+d x) \tan ^3(c+d x)}{4 d}+\frac {a \tan ^4(c+d x)}{4 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.09, antiderivative size = 74, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 5, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.185, Rules used = {2913, 2687, 30,
2691, 3855} \begin {gather*} \frac {a \tan ^4(c+d x)}{4 d}+\frac {3 b \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {b \tan ^3(c+d x) \sec (c+d x)}{4 d}-\frac {3 b \tan (c+d x) \sec (c+d x)}{8 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 2687
Rule 2691
Rule 2913
Rule 3855
Rubi steps
\begin {align*} \int \sec ^2(c+d x) (a+b \sin (c+d x)) \tan ^3(c+d x) \, dx &=a \int \sec ^2(c+d x) \tan ^3(c+d x) \, dx+b \int \sec (c+d x) \tan ^4(c+d x) \, dx\\ &=\frac {b \sec (c+d x) \tan ^3(c+d x)}{4 d}-\frac {1}{4} (3 b) \int \sec (c+d x) \tan ^2(c+d x) \, dx+\frac {a \text {Subst}\left (\int x^3 \, dx,x,\tan (c+d x)\right )}{d}\\ &=-\frac {3 b \sec (c+d x) \tan (c+d x)}{8 d}+\frac {b \sec (c+d x) \tan ^3(c+d x)}{4 d}+\frac {a \tan ^4(c+d x)}{4 d}+\frac {1}{8} (3 b) \int \sec (c+d x) \, dx\\ &=\frac {3 b \tanh ^{-1}(\sin (c+d x))}{8 d}-\frac {3 b \sec (c+d x) \tan (c+d x)}{8 d}+\frac {b \sec (c+d x) \tan ^3(c+d x)}{4 d}+\frac {a \tan ^4(c+d x)}{4 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.20, size = 84, normalized size = 1.14 \begin {gather*} \frac {b \sec (c+d x) \tan ^3(c+d x)}{d}+\frac {a \tan ^4(c+d x)}{4 d}-\frac {b \left (6 \sec ^3(c+d x) \tan (c+d x)-3 \left (\tanh ^{-1}(\sin (c+d x))+\sec (c+d x) \tan (c+d x)\right )\right )}{8 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.21, size = 98, normalized size = 1.32
method | result | size |
derivativedivides | \(\frac {\frac {a \left (\sin ^{4}\left (d x +c \right )\right )}{4 \cos \left (d x +c \right )^{4}}+b \left (\frac {\sin ^{5}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}-\frac {\sin ^{5}\left (d x +c \right )}{8 \cos \left (d x +c \right )^{2}}-\frac {\left (\sin ^{3}\left (d x +c \right )\right )}{8}-\frac {3 \sin \left (d x +c \right )}{8}+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}\) | \(98\) |
default | \(\frac {\frac {a \left (\sin ^{4}\left (d x +c \right )\right )}{4 \cos \left (d x +c \right )^{4}}+b \left (\frac {\sin ^{5}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}-\frac {\sin ^{5}\left (d x +c \right )}{8 \cos \left (d x +c \right )^{2}}-\frac {\left (\sin ^{3}\left (d x +c \right )\right )}{8}-\frac {3 \sin \left (d x +c \right )}{8}+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}\) | \(98\) |
risch | \(\frac {i \left (8 i a \,{\mathrm e}^{6 i \left (d x +c \right )}+5 b \,{\mathrm e}^{7 i \left (d x +c \right )}-3 b \,{\mathrm e}^{5 i \left (d x +c \right )}+8 i a \,{\mathrm e}^{2 i \left (d x +c \right )}+3 b \,{\mathrm e}^{3 i \left (d x +c \right )}-5 b \,{\mathrm e}^{i \left (d x +c \right )}\right )}{4 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{4}}+\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) b}{8 d}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) b}{8 d}\) | \(134\) |
norman | \(\frac {-\frac {3 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}+\frac {2 b \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {11 b \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}+\frac {2 b \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {3 b \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}+\frac {4 a \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {4 a \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}}{\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{4} \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}-\frac {3 b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{8 d}+\frac {3 b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8 d}\) | \(187\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 89, normalized size = 1.20 \begin {gather*} \frac {3 \, b \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, b \log \left (\sin \left (d x + c\right ) - 1\right ) + \frac {2 \, {\left (5 \, b \sin \left (d x + c\right )^{3} + 4 \, a \sin \left (d x + c\right )^{2} - 3 \, b \sin \left (d x + c\right ) - 2 \, a\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1}}{16 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 93, normalized size = 1.26 \begin {gather*} \frac {3 \, b \cos \left (d x + c\right )^{4} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, b \cos \left (d x + c\right )^{4} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 8 \, a \cos \left (d x + c\right )^{2} - 2 \, {\left (5 \, b \cos \left (d x + c\right )^{2} - 2 \, b\right )} \sin \left (d x + c\right ) + 4 \, a}{16 \, d \cos \left (d x + c\right )^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.55, size = 81, normalized size = 1.09 \begin {gather*} \frac {3 \, b \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right ) - 3 \, b \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right ) + \frac {2 \, {\left (5 \, b \sin \left (d x + c\right )^{3} + 4 \, a \sin \left (d x + c\right )^{2} - 3 \, b \sin \left (d x + c\right ) - 2 \, a\right )}}{{\left (\sin \left (d x + c\right )^{2} - 1\right )}^{2}}}{16 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 18.08, size = 144, normalized size = 1.95 \begin {gather*} \frac {-\frac {3\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{4}+\frac {11\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{4}+4\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+\frac {11\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{4}-\frac {3\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}+\frac {3\,b\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{4\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________